package com.leoman.service;

import com.leoman.entity.Circle;
import com.leoman.exception.NoDataException;
import com.leoman.exception.ParamErrorException;
import com.leoman.service.common.ICommonService;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartRequest;

/**
 * CircleService
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:51.
 */
public interface CircleService extends ICommonService<Circle> {

    // 草丛列表（分页）
    Page<Circle> iPageForApp(Integer userId, Integer isMe, String tagName, Integer pageNum, Integer pageSize);

    // 我的收藏草丛列表（分页）
    Page<Circle> iPageForAppCollect(Integer userId, String tagName, Integer pageNum, Integer pageSize);

    // 添加草丛
    void addCircleInfo(Boolean isAdmin,
                       Integer tempId,
                       Integer userId,
                       String title,
                       String content,
                       String synopsis,
                       String labels,
                       Integer isDraft,
                       MultipartRequest multipartRequest) throws ParamErrorException;

    // 根据该用户查询草丛草稿
    Circle iFindDraftByUserId(Integer userId) throws ParamErrorException, NoDataException;

    // 草丛列表（分页）
    Page<Circle> pageByParams(String userName, String startTime, String endTime, Integer pageNum, Integer pageSize);

    // 置顶
    Integer toTop(Integer paperId);

    // 批量删除草丛
    Integer batchDelete(String ids);
}